package aaaCasher;

import java.awt.print.PrinterJob;

import aaaAtiDslParser.PrintTest1;
import jpos.JposException;
import jpos.POSPrinter;
import jpos.POSPrinterConst;

public class PrintTest {

	public static void main(String[] args) throws JposException {
		//tt();
	       //获取打印服务对象

        PrinterJob  job  =  PrinterJob.getPrinterJob();          

   //     PageFormat  pageFormat  =  job.defaultPage();//得到默认页格式    

      job.setPrintable(new  PrintTest1());//设置打印类


System.out.println("aa");
	}

	private static void tt() throws JposException {
		POSPrinter m_printer = new POSPrinter();
		String string = "PDF-XChange Printer 2012";
		string="POSPrinter";
		m_printer.open(string);
		//only use 
		  // claim exclsive usage of the printer object
		m_printer.claim(1000);m_printer.setDeviceEnabled(true);
		m_printer.printNormal(POSPrinterConst.PTR_S_RECEIPT, "测试结果");
	}

}
